#ifndef __MOUSE_H_
#define __MOUSE_H_

#include "windows.h"
#include <dinput.h>
// Here we define a custom data format to store input from a mouse. In a 
// real program you would almost certainly use either the predefined 
// DIMOUSESTATE or DIMOUSESTATE2 structure to store mouse input, but some 
// input devices such as the Sidewinder GameVoice controller are not well
// described by the provided types and may require custom formats.

struct MouseState
{
    LONG lAxisX;
    LONG lAxisY;
	LONG lAxisZ;
    BYTE abButtons[3];
    BYTE bPadding;       // Structure must be DWORD multiple in size.   
};

class Input 
{
public:
	HRESULT InitDirectInput( );
	VOID FreeDirectInput();
	HRESULT GetMouseState( MouseState *ms);
private:
	LPDIRECTINPUT8          g_pDI; // DirectInput interface       
	LPDIRECTINPUTDEVICE8    g_pMouse; // Device interface
};

#endif